package com.chd.driversystem.domain;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;

import java.util.Date;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Index;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.Unique;

/**
 * Created by shawnfly on 17-5-2.
 */
@Entity(indexes = {@Index(value = "id ASC",unique = true)})
public class Operation {
    @Id(autoincrement = true)
    private Long id;
    @NotNull
    private Long userId;
    @NotNull
    @Unique
    private Date createDate;
    private Integer brake;//刹车次数次数
    private Integer shift;//换挡次数次数
    private Integer rapidAcc;//急加速次数
    private Integer rapidDec;//急减速次数
    private Integer rpm;//转速控制次数
    @Generated(hash = 2110794569)
    public Operation(Long id, @NotNull Long userId, @NotNull Date createDate,
            Integer brake, Integer shift, Integer rapidAcc, Integer rapidDec,
            Integer rpm) {
        this.id = id;
        this.userId = userId;
        this.createDate = createDate;
        this.brake = brake;
        this.shift = shift;
        this.rapidAcc = rapidAcc;
        this.rapidDec = rapidDec;
        this.rpm = rpm;
    }
    @Generated(hash = 1326595030)
    public Operation() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getUserId() {
        return this.userId;
    }
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Date getCreateDate() {
        return this.createDate;
    }
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }
    public Integer getBrake() {
        return this.brake;
    }
    public void setBrake(Integer brake) {
        this.brake = brake;
    }
    public Integer getShift() {
        return this.shift;
    }
    public void setShift(Integer shift) {
        this.shift = shift;
    }
    public Integer getRapidAcc() {
        return this.rapidAcc;
    }
    public void setRapidAcc(Integer rapidAcc) {
        this.rapidAcc = rapidAcc;
    }
    public Integer getRapidDec() {
        return this.rapidDec;
    }
    public void setRapidDec(Integer rapidDec) {
        this.rapidDec = rapidDec;
    }
    public Integer getRpm() {
        return this.rpm;
    }
    public void setRpm(Integer rpm) {
        this.rpm = rpm;
    }

    @Override
    public String toString() {
        return "Operation{" +
                "id=" + id +
                ", userId=" + userId +
                ", createDate=" + createDate +
                ", brake=" + brake +
                ", shift=" + shift +
                ", rapidAcc=" + rapidAcc +
                ", rapidDec=" + rapidDec +
                ", rpm=" + rpm +
                '}';
    }
}
